package com.flyxiaozhu.erp.core.entities;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * @author flyxiaozhu
 * @date 2019-04-17 23:09
 */
@Entity
@DynamicUpdate
@DynamicInsert
@Data
public class GoodsSku extends BaseEntity {

    @Column(columnDefinition = "varchar(255) NOT NULL DEFAULT '' COMMENT '属性值,例：[属性id:属性值id,属性id:属性值id...]'")
    private String attrValues;

    @Column(columnDefinition = "varchar(255) not null default '' comment '属性值描述'")
    private String skuDesc;

    @Column(columnDefinition = "varchar(625) not null default '' comment '属性值描述'")
    private String skuDetail;

    @Column(columnDefinition = "int(11) not null default 0 comment '市场价格'")
    private long marketPrice;

    @Column(columnDefinition = "int(11) not null default 0 comment '销售价格'")
    private long sellingPrice;

    @Column(columnDefinition = "int(11) not null default 0 comment '库存'")
    private int stock;

    @Column(columnDefinition = "int(11) not null default 0 comment '销量'")
    private int sales;

    @Column(columnDefinition = "int(11) not null default 0 comment '商品ID'")
    private long goodsId;
}
